using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class SkinMeshLOD_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(global::SkinMeshLOD);

            field = type.GetField("MainCamera", flag);
            app.RegisterCLRFieldGetter(field, get_MainCamera_0);
            app.RegisterCLRFieldSetter(field, set_MainCamera_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_MainCamera_0, AssignFromStack_MainCamera_0);
            field = type.GetField("skinnedMeshes", flag);
            app.RegisterCLRFieldGetter(field, get_skinnedMeshes_1);
            app.RegisterCLRFieldSetter(field, set_skinnedMeshes_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_skinnedMeshes_1, AssignFromStack_skinnedMeshes_1);
            field = type.GetField("skinQuality", flag);
            app.RegisterCLRFieldGetter(field, get_skinQuality_2);
            app.RegisterCLRFieldSetter(field, set_skinQuality_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_skinQuality_2, AssignFromStack_skinQuality_2);
            field = type.GetField("MinQuality", flag);
            app.RegisterCLRFieldGetter(field, get_MinQuality_3);
            app.RegisterCLRFieldSetter(field, set_MinQuality_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_MinQuality_3, AssignFromStack_MinQuality_3);
            field = type.GetField("MidQuality", flag);
            app.RegisterCLRFieldGetter(field, get_MidQuality_4);
            app.RegisterCLRFieldSetter(field, set_MidQuality_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_MidQuality_4, AssignFromStack_MidQuality_4);
            field = type.GetField("MaxQuality", flag);
            app.RegisterCLRFieldGetter(field, get_MaxQuality_5);
            app.RegisterCLRFieldSetter(field, set_MaxQuality_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_MaxQuality_5, AssignFromStack_MaxQuality_5);
            field = type.GetField("DistanceLevel1", flag);
            app.RegisterCLRFieldGetter(field, get_DistanceLevel1_6);
            app.RegisterCLRFieldSetter(field, set_DistanceLevel1_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_DistanceLevel1_6, AssignFromStack_DistanceLevel1_6);
            field = type.GetField("DistanceLevel2", flag);
            app.RegisterCLRFieldGetter(field, get_DistanceLevel2_7);
            app.RegisterCLRFieldSetter(field, set_DistanceLevel2_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_DistanceLevel2_7, AssignFromStack_DistanceLevel2_7);


            app.RegisterCLRCreateDefaultInstance(type, () => new global::SkinMeshLOD());
            app.RegisterCLRCreateArrayInstance(type, s => new global::SkinMeshLOD[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_MainCamera_0(ref object o)
        {
            return global::SkinMeshLOD.MainCamera;
        }

        static StackObject* CopyToStack_MainCamera_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = global::SkinMeshLOD.MainCamera;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_MainCamera_0(ref object o, object v)
        {
            global::SkinMeshLOD.MainCamera = (UnityEngine.Camera)v;
        }

        static StackObject* AssignFromStack_MainCamera_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Camera @MainCamera = (UnityEngine.Camera)typeof(UnityEngine.Camera).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            global::SkinMeshLOD.MainCamera = @MainCamera;
            return ptr_of_this_method;
        }

        static object get_skinnedMeshes_1(ref object o)
        {
            return ((global::SkinMeshLOD)o).skinnedMeshes;
        }

        static StackObject* CopyToStack_skinnedMeshes_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).skinnedMeshes;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_skinnedMeshes_1(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).skinnedMeshes = (UnityEngine.SkinnedMeshRenderer[])v;
        }

        static StackObject* AssignFromStack_skinnedMeshes_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.SkinnedMeshRenderer[] @skinnedMeshes = (UnityEngine.SkinnedMeshRenderer[])typeof(UnityEngine.SkinnedMeshRenderer[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((global::SkinMeshLOD)o).skinnedMeshes = @skinnedMeshes;
            return ptr_of_this_method;
        }

        static object get_skinQuality_2(ref object o)
        {
            return ((global::SkinMeshLOD)o).skinQuality;
        }

        static StackObject* CopyToStack_skinQuality_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).skinQuality;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_skinQuality_2(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).skinQuality = (UnityEngine.SkinQuality)v;
        }

        static StackObject* AssignFromStack_skinQuality_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.SkinQuality @skinQuality = (UnityEngine.SkinQuality)typeof(UnityEngine.SkinQuality).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20);
            ((global::SkinMeshLOD)o).skinQuality = @skinQuality;
            return ptr_of_this_method;
        }

        static object get_MinQuality_3(ref object o)
        {
            return ((global::SkinMeshLOD)o).MinQuality;
        }

        static StackObject* CopyToStack_MinQuality_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).MinQuality;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MinQuality_3(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).MinQuality = (System.Int32)v;
        }

        static StackObject* AssignFromStack_MinQuality_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @MinQuality = ptr_of_this_method->Value;
            ((global::SkinMeshLOD)o).MinQuality = @MinQuality;
            return ptr_of_this_method;
        }

        static object get_MidQuality_4(ref object o)
        {
            return ((global::SkinMeshLOD)o).MidQuality;
        }

        static StackObject* CopyToStack_MidQuality_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).MidQuality;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MidQuality_4(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).MidQuality = (System.Int32)v;
        }

        static StackObject* AssignFromStack_MidQuality_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @MidQuality = ptr_of_this_method->Value;
            ((global::SkinMeshLOD)o).MidQuality = @MidQuality;
            return ptr_of_this_method;
        }

        static object get_MaxQuality_5(ref object o)
        {
            return ((global::SkinMeshLOD)o).MaxQuality;
        }

        static StackObject* CopyToStack_MaxQuality_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).MaxQuality;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MaxQuality_5(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).MaxQuality = (System.Int32)v;
        }

        static StackObject* AssignFromStack_MaxQuality_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @MaxQuality = ptr_of_this_method->Value;
            ((global::SkinMeshLOD)o).MaxQuality = @MaxQuality;
            return ptr_of_this_method;
        }

        static object get_DistanceLevel1_6(ref object o)
        {
            return ((global::SkinMeshLOD)o).DistanceLevel1;
        }

        static StackObject* CopyToStack_DistanceLevel1_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).DistanceLevel1;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_DistanceLevel1_6(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).DistanceLevel1 = (System.Single)v;
        }

        static StackObject* AssignFromStack_DistanceLevel1_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @DistanceLevel1 = *(float*)&ptr_of_this_method->Value;
            ((global::SkinMeshLOD)o).DistanceLevel1 = @DistanceLevel1;
            return ptr_of_this_method;
        }

        static object get_DistanceLevel2_7(ref object o)
        {
            return ((global::SkinMeshLOD)o).DistanceLevel2;
        }

        static StackObject* CopyToStack_DistanceLevel2_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::SkinMeshLOD)o).DistanceLevel2;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_DistanceLevel2_7(ref object o, object v)
        {
            ((global::SkinMeshLOD)o).DistanceLevel2 = (System.Single)v;
        }

        static StackObject* AssignFromStack_DistanceLevel2_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @DistanceLevel2 = *(float*)&ptr_of_this_method->Value;
            ((global::SkinMeshLOD)o).DistanceLevel2 = @DistanceLevel2;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new global::SkinMeshLOD();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
